package com.dgut.medicalsystem.mapper;

import com.dgut.medicalsystem.entity.Notice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 坚宝医疗
 * @since 2021-09-03
 */
@Mapper
public interface NoticeMapper extends BaseMapper<Notice> {

    @Select("SELECT * FROM notice where owner = #{uid} and status = #{status} order by date desc")
    List<Notice> getByStatus(@Param("uid")int userid, @Param("status") int status);

}
